import SwiftUI

@Observable final class IndicatorModel {
    
    enum TipContent: String {
        case loading = "加载中..."
        case login = "登录中..."
        case progressLoading
    }
    
    var showLoadingIndicator: Bool = false
    private(set) var tipContent: TipContent = .loading
    
    var tip: String {
        tipContent.rawValue
    }
    
    func show(content: TipContent) {
        showLoadingIndicator = true
        tipContent = content
    }
    
    func hide() {
        showLoadingIndicator = false
    }
    
}
